package erp_services

import (
	"errors"
	"xiehui-service/app/models/erp_models"
	"xiehui-service/global"
)

type mixtableService struct {
}

var MixtableService = new(mixtableService)

// 查询拌台
func (mixtableService *mixtableService) GetMixtables() (mixtables []erp_models.Mixtable, err error) {
	err = global.App.DB.Where("state = ? ", 1).Find(&mixtables).Error
	if err != nil {
		if err.Error() == "record not found" {
			err = errors.New("数据不存在")
		}
	}
	return
}
